package com.biz.primus.management.homepage.feign;

import com.biz.primus.homepage.vo.*;
import com.biz.primus.management.homepage.degraded.DegradedHomepageFeignClient;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 分类Feign Client
 *
 * @author david-liu
 */
@FeignClient(name = "service-homepage", fallback = DegradedHomepageFeignClient.class)
public interface HomepageFeignClient {

    @GetMapping("soa/homepageService/cover/list")
    List<CoverRoVo> listCover();

    @PostMapping("soa/homepageService/cover/save")
    CoverUpdateVo saveCover(@RequestBody CoverUpdateVo coverUpdateVo);

    @GetMapping("soa/homepageService/cover/findOne")
    CoverRoVo findCover(@RequestParam("coverId") String coverId);

    @GetMapping("soa/homepageService/program/findone")
    ProgramRoVo findProgram(@RequestParam("programId") Long programId);

    @GetMapping("soa/homepageService/getAllProgramsByCoverId")
    List<ProgramRoVo> getAllProgramsByCoverId(@RequestParam("coverId") String coverId);

    @PostMapping("soa/homepageService/cover/delete")
    void deleteCover(@RequestBody CoverDeleteVo coverDeleteVo);


    @GetMapping("soa/homepageService/cover/listCoverProvider")
    List<CoverProviderVo> listCoverProvider();

    @GetMapping("soa/homepageService/program/getProgramDetail")
    ProgramDetailRespVo getProgramDetail(@RequestParam("programId") Long programId);

    @GetMapping("soa/homepageService/program/save")
    ProgramRoVo save(@RequestBody ProgramUpdateReqVo reqVo);

    @GetMapping("soa/homepageService/program/delete")
    void delete(@RequestParam("programId") Long programId);

    @PostMapping("soa/homepageService/doClone")
    CoverRoVo doClone(@RequestBody CoverWithPrograms coverWithPrograms,@RequestParam("name") String name);

    @GetMapping("soa/homepageService/clone")
    CoverWithPrograms clone(@RequestParam("coverId") String coverId);



//    @PostMapping("soa/brandService/findAll")
//    SpringPageVO<BrandListItemVo>  findAll(@RequestBody BrandQueryVo reqVo);
//
//    @GetMapping("soa/brandService/getBrandById")
//    UpdateBrandVo getBrandById(@RequestParam("id") Long brandId);
//
//    @PostMapping("soa/brandService/updateBrand")
//    void update(UpdateBrandVo brandVo);
}
